<html>
<head>
	<?php $this->load->view('web/head');?>    
</head>
<body>
	<div class="page">
		<div class="header">
			<div class="logo">
            	<img src="water.png" height="90"/>
            </div>
			<div class="logo_right">
            	<img src="water.png" width="90" height="90"/>
            </div>
            <div class="nav">
            	<ul>
                	<?php if (@$nav_content):?>
						<?php foreach ($nav_content as $nav):?>
                            
                            <?php if($nav['master_menu'] == 1):?>
                                <?php if($nav['group_menu'] == 1):?>
                                    <li>
                                    	<a href="#"><?php echo $nav['nama_menu']?> &#8250;&#8250;</a>
                                        <ul>
                                            <?php foreach ($sub_nav_content as $subNav):?>
                                                <?php if($subNav['induk_menu'] == $nav['id_menu']):?>
                                                    <li ><a href="<?php echo site_url()?>homepage/content/<?php echo $subNav['id_menu']?>"><?php echo $subNav['nama_menu']?></a></li>
                                                <?php endif;?>
                                            <?php endforeach?>
                                        </ul>
                                    </li>
                                <?php else:?>
                                	<li><a href="<?php echo site_url()?>homepage/content/<?php echo $nav['id_menu']?>"><?php echo $nav['nama_menu']?></a></li>
                                <?php endif;?>
                            <?php endif;?>
                        <?php endforeach?>
                    <?php endif;?>
              	</ul>
            </div>
		</div>
		<div class="slide">
        	<?php if (@$slide_content):?>
                <?php foreach ($slide_content as $slide):?>
                	<img src="<?php echo base_url(); ?>upload/picture/<?php echo $slide['upload_image']?>"/>
                <?php endforeach?>
			<?php else:?>
            	<img src="<?php echo base_url(); ?>upload/image/warning_slide.png"/>
            <?php endif;?>
        </div>
		<div class="container">
        	<div class="container_left">
            	<div class="borderHeader">Partner</div>
                <div class="borderContent">
                	<div id="partner">
                        <img src="<?php echo base_url(); ?>bootstrap/img/facebook.jpg"/>
                        <img src="<?php echo base_url(); ?>bootstrap/img/google.png"/>
                    </div>
                </div>
                
                <div class="cleanLine">&nbsp;</div>                
                
                <div class="borderHeader">Live chat</div>
                <div class="borderContent">
                	<?php if (@$user_online):?>
						<?php foreach($user_online as $online):?>
                            <a href="ymsgr:sendIM?<?php echo $online['chat_user']?>" width="20" height="20"> 
                                <img src="http://opi.yahoo.com/online?u=<?php echo $online['chat_user']?>&amp;m=g&amp;t=2&amp;l=us"/></br>
                            </a>
                        <?php endforeach?>
                    <?php else:?>
                       	Tidak ada online
                    <?php endif?>
                </div>
                
                <div class="cleanLine">&nbsp;</div>
                
                <div class="borderHeader">Sosial page</div>
                <div class="borderContent">
                	<img src="<?php echo base_url(); ?>bootstrap/img/facebook.jpg" width="40" height="40"/>
					<img src="<?php echo base_url(); ?>bootstrap/img/google.png" width="40" height="40"/>
                </div>
            </div>
            <div class="container_right">
            	<?php if (@$get_content):?>
					<?php if (@$get_content[0]['jenis_menu'] == 2): //galery?>
                        <?php foreach ($get_content as $content):?>
                            <h2><?php echo $content['title_menu']?></h2>
                            <?php echo $content['content_menu']?>
                        <?php endforeach?><br/>
                        <?php if(@$galeri_content):?>
                            <?php foreach ($galeri_content as $galery):?>
                                <?php if($galery['id_menu'] == @$get_content[0]['id_menu']):?>
                                    <a href="<?php echo base_url(); ?>upload/picture/<?php echo $galery['upload_image'] ?>" title="<?php echo $galery['deskripsi_image'] ?>" rel="lightbox">
                                        <img src="<?php echo base_url(); ?>upload/picture/<?php echo $galery['upload_image'] ?>" alt="" width="200" height="200" class="borderGalery">
                                    </a>
                                <?php endif;?>
                            <?php endforeach?>	
                        <?php else:?>
                            <div class="alert alert-error">
                                Not found data
                            </div>
                        <?php endif;?>
                                            
                    <?php elseif(@$get_content[0]['jenis_menu'] == 3): //contact us?>
                        <?php foreach ($get_content as $content):?>
                            <h2><?php echo $content['title_menu']?></h2>
                            <?php echo $content['content_menu']?>
                        <?php endforeach?><br/>
                        <h4>Form kritik & saran</h4>
                        <hr>
                        <?php $success = $this->session->flashdata('success');?>
                        <?php if ($success):?>
                            <div class="alert alert-success">
                                Data telah tersimpan
                            </div>
                        <?php endif?>
    
                        <?php $error = $this->session->flashdata('error');?>
                        <?php if ($error):?>
                            <div class="alert alert-error">
                                <b>Data gagal tersimpan</b>, Captcha salah
                            </div>
                        <?php endif?>
                        <div style="margin-left:-100px">
                            <?php $this->load->view("web/form_saran")?>
                        </div>
                    <?php else: //other?>
                        <?php foreach ($get_content as $content):?>
                            <h2><?php echo $content['title_menu']?></h2><br/>
                            <?php echo $content['content_menu']?>
                        <?php endforeach?>
                    <?php endif;?>
                <?php else:?>
                    <div class="alert alert-error">
                        Not found data
                    </div>
                <?php endif;?>
            </div>
        </div>
        <div class="cleanLine">&nbsp;</div>
		<div class="footer">
			&copy; 2013 unknown company
		</div>
	</div>
</body>
</html>